Skip to content

MTA-6471 C# Provider Documentation#309

Open
Pkylas007 wants to merge 2 commits intomainfrom
mta-6471-dotnet-provider
Open

MTA-6471 C# Provider Documentation#309
Pkylas007 wants to merge 2 commits intomainfrom
mta-6471-dotnet-provider

Conversation

@Pkylas007
Copy link
Collaborator

@Pkylas007 Pkylas007 commented Feb 12, 2026

JIRA

Version

  • 8.1.0

Preview

Summary by CodeRabbit

  • Documentation
    • Added a step‑by‑step guide for creating and validating custom C# rules, with sample commands and migration notes.
    • Renamed provider references from Dotnet to C# across docs and examples; expanded provider capability descriptions (gRPC, parsing, semantic/graph analysis).
    • Clarified YAML rule guidance: new location options (CLASS, METHOD, ALL) and updated pattern/location examples.
    • Expanded VS Code/.NET analysis prerequisites and surfaced the C# guide in the rules development guide.
    • Minor editorial tweaks to headers and punctuation.

@coderabbitai
Copy link

coderabbitai bot commented Feb 23, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Renamed provider references from dotnet to csharp, added a new C# custom-rule creation guide, introduced location-based provider scopes (CLASS/METHOD/ALL), expanded VS Code prerequisites for .NET/C# analysis tooling, and made minor header/punctuation edits in rule docs.

Changes

Cohort / File(s) Summary
Provider docs & YAML guidance
assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc, docs/topics/rules-development/yaml-dotnet-provider.adoc, docs/topics/rules-development/yaml-provider-conditions.adoc
Replaced dotnet references with csharp; switched examples to csharp.referenced; introduced location field replacing single-namespace semantics with CLASS, METHOD, ALL; updated examples and explanatory text.
C# custom rule guide
docs/topics/rules-development/create-csharp-custom-rule.adoc
Added new procedure showing creation and validation of a C# custom rule (csharp-rule.yaml), sample content, repo clone and mta-cli analyze commands, migration checklist, and verification steps.
Assembly include
assemblies/rules-development-guide/assembly_creating-rule.adoc
Inserted include to surface the new C# custom-rule guide in the creating-rule assembly.
VS Code prerequisites
docs/topics/vscode/proc_vscode-analyzing-application.adoc
Expanded prerequisites to cover .NET/C# analysis: C# extension, Rust/cargo, protoc, .NET SDK 9.x+, optional ilspycmd and paket; retained profile configuration instruction.
Minor edits
assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc
Header level adjusted and a punctuation tweak in the when block description; external provider list wording updated to "C#".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped from dotnet to bright C#,
I sniffed for CLASS, METHOD, and ALL,
Penned a guide, a rule, and tidy commands,
VS Code sharpened tools — ready to call! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: updating documentation for the C# provider, reflecting the transition from the dotnet provider to the csharp provider across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch mta-6471-dotnet-provider
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

CodeRabbit can scan for known vulnerabilities in your dependencies using OSV Scanner.

OSV Scanner will automatically detect and report security vulnerabilities in your project's dependencies. No additional configuration is required.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc (1)

37-39: ⚠️ Potential issue | 🟡 Minor

Fix typo and clarify sentence structure.

Line 37 has a double period, and Line 39 reads awkwardly. Consider a small rewrite for clarity.

✏️ Suggested edit
-In a rule, the when block is where the conditions for matching the rule are specified. Each provider offers a series of capabilities to do matching.. The search query in the rule condition can contain patterns, code locations, specific dependencies to be found, and so on, to evaluate the source code and dependencies.
+In a rule, the when block is where the conditions for matching the rule are specified. Each provider offers a series of capabilities to do matching. The search query in the rule condition can contain patterns, code locations, specific dependencies to be found, and so on, to evaluate the source code and dependencies.
@@
-The syntax for the when block is as follows: contains one condition, but that condition can have multiple conditions nested under it.
+The syntax for the when block is as follows. It contains one condition, but that condition can have multiple nested conditions under it.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc` around
lines 37 - 39, Fix the double period in the sentence describing provider
capabilities (remove the extra "." after "matching") and rewrite the last
sentence about the when block for clarity: change "The syntax for the when block
is as follows: contains one condition, but that condition can have multiple
conditions nested under it." to a clearer form such as "The syntax for the when
block is as follows: it contains a single top-level condition which may have
multiple nested subconditions." Reference the phrases "when block" and "the
search query in the rule condition" to locate the lines to edit.
docs/topics/rules-development/yaml-provider-conditions.adoc (1)

30-34: ⚠️ Potential issue | 🟡 Minor

Update FeatureName to match C# provider rename.

The file now uses csharp, but the Developer Preview banner still says “Dotnet provider.” Please align the feature name with the new provider terminology.

✏️ Suggested edit
-:FeatureName: Dotnet provider
+:FeatureName: C# provider
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/yaml-provider-conditions.adoc` around lines 30
- 34, Update the document attribute `FeatureName` to use the renamed provider
term to match the `csharp` usage elsewhere (replace the current "Dotnet
provider" value with the new provider name, e.g., "C# provider" or "csharp
provider") so the Developer Preview banner and feature references are
consistent; look for the `:FeatureName:` attribute near the top of the file and
change its value accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/topics/rules-development/create-csharp-custom-rule.adoc`:
- Around line 15-77: Unify the filename and placeholder inconsistencies and
correct the typo: rename all occurrences to a single consistent filename (use
either csharp-rule.yml or csharp-rule.yaml) and update the CLI example to use
the same filename in the --rules flag (references: the displayed filename in the
YAML block and the CLI line with --rules ~/csharp-rule.yaml), normalize the path
placeholder style to use one form (choose either _path_to_report_ or
_path_to-report_ and update all occurrences including the "Open the static
report at" line and the CLI -i/-o examples), and fix the spelling of
"respository" to "repository" in the clone instruction text (reference: the git
clone line and the descriptive line mentioning the c-sharp-analyzer-provider
repository).

In `@docs/topics/rules-development/yaml-dotnet-provider.adoc`:
- Around line 7-12: Update the section heading and field names to match the
`csharp` rule schema: rename the title from "Dotnet provider" to "csharp
provider" (or otherwise reference `csharp`), and change plural/inconsistent
field names `patterns`,`locations`, and `file_paths` (and any occurrences with
inconsistent spacing like `pattern,location,and`) to the singular,
schema-correct names `pattern`, `location`, and `filepaths`; ensure spacing
around commas is normalized (e.g., "pattern, location, and filepaths") and any
descriptive text references the `csharp` provider and its `referenced`
capability consistently.

---

Outside diff comments:
In `@assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc`:
- Around line 37-39: Fix the double period in the sentence describing provider
capabilities (remove the extra "." after "matching") and rewrite the last
sentence about the when block for clarity: change "The syntax for the when block
is as follows: contains one condition, but that condition can have multiple
conditions nested under it." to a clearer form such as "The syntax for the when
block is as follows: it contains a single top-level condition which may have
multiple nested subconditions." Reference the phrases "when block" and "the
search query in the rule condition" to locate the lines to edit.

In `@docs/topics/rules-development/yaml-provider-conditions.adoc`:
- Around line 30-34: Update the document attribute `FeatureName` to use the
renamed provider term to match the `csharp` usage elsewhere (replace the current
"Dotnet provider" value with the new provider name, e.g., "C# provider" or
"csharp provider") so the Developer Preview banner and feature references are
consistent; look for the `:FeatureName:` attribute near the top of the file and
change its value accordingly.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f7a8ab9 and d376be0.

📒 Files selected for processing (5)
  • assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc
  • docs/topics/rules-development/create-csharp-custom-rule.adoc
  • docs/topics/rules-development/yaml-dotnet-provider.adoc
  • docs/topics/rules-development/yaml-provider-conditions.adoc
  • docs/topics/vscode/proc_vscode-analyzing-application.adoc

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
docs/topics/rules-development/create-csharp-custom-rule.adoc (1)

53-53: ⚠️ Potential issue | 🟡 Minor

Fix spelling: "respository" should be "repository".

This typo was flagged in a previous review but remains unfixed.

✏️ Proposed fix
-. Clone the `c-sharp-analyzer-provider` respository that has the application in the `test-data/nerd-dinner` path:
+. Clone the `c-sharp-analyzer-provider` repository that has the application in the `test-data/nerd-dinner` path:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/create-csharp-custom-rule.adoc` at line 53, Fix
the typo in the sentence that reads ". Clone the `c-sharp-analyzer-provider`
respository that has the application in the `test-data/nerd-dinner` path:" by
changing "respository" to "repository" so it reads "...
`c-sharp-analyzer-provider` repository ..."; update the same sentence in
create-csharp-custom-rule.adoc where the `c-sharp-analyzer-provider` and
`test-data/nerd-dinner` strings appear.
docs/topics/rules-development/yaml-dotnet-provider.adoc (1)

12-12: ⚠️ Potential issue | 🟡 Minor

Fix inconsistent field name formatting and spacing.

This line has multiple issues that were flagged in a previous review:

  • Inconsistent spacing around commas in field names: `pattern`,`location` (no spaces) vs pattern,location,and file_paths (inconsistent spaces)
  • Inconsistent field naming: file_path (singular) vs file_paths (plural)
  • Missing article: "supports referenced capability" should be "supports the referenced capability"
✏️ Proposed fix for consistency
-The `csharp` provider uses a gRPC interface to parse using tree-sitter and uses stack graph for performing semantic analysis of your codebases to identify violations before you migrate your code. The provider supports referenced capability in rules that are used to perform MTA analysis. You can define fields such as `pattern`,`location` and `file_path` in the rules based on which the provider searches the code for violations. MTA uses the pattern,location,and file_paths defined in rules to search for type,classes,methods, and fields in the source code.
+The `csharp` provider uses a gRPC interface to parse using tree-sitter and uses stack graph for performing semantic analysis of your codebases to identify violations before you migrate your code. The provider supports the referenced capability in rules that are used to perform MTA analysis. You can define fields such as `pattern`, `location`, and `filepaths` in the rules based on which the provider searches the code for violations. MTA uses the `pattern`, `location`, and `filepaths` defined in rules to search for types, classes, methods, and fields in the source code.

Run the following script to verify the correct field names in the csharp provider schema:

#!/bin/bash
# Description: Search for csharp provider field definitions to verify correct naming

# Search for csharp provider schema or usage examples
rg -n -C5 'csharp\.referenced' --type=yaml
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/yaml-dotnet-provider.adoc` at line 12, Update
the sentence for consistent naming/spacing and grammar: change "supports
referenced capability" to "supports the referenced capability", format the field
names with consistent spacing and commas as "`pattern`, `location`, and
`file_paths`" (use the plural `file_paths` to match schema), and ensure the
provider reference remains "the `csharp` provider" to keep style consistent.
🧹 Nitpick comments (1)
docs/topics/rules-development/yaml-dotnet-provider.adoc (1)

7-7: Consider using "C#" in the title for better readability.

The title currently says "Csharp provider" but "C# provider" would be more conventional and readable, matching how the language is typically written.

✏️ Suggested edit
-= Csharp provider
+= C# provider
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/yaml-dotnet-provider.adoc` at line 7, Update
the AsciiDoc top-level title string currently written as "= Csharp provider" to
use the conventional language name by changing it to "= C# provider"; locate the
heading line in the document (the line that begins with "= Csharp provider") and
replace "Csharp" with "C#" so the title reads "C# provider".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/topics/rules-development/create-csharp-custom-rule.adoc`:
- Line 53: Fix the typo in the sentence that reads ". Clone the
`c-sharp-analyzer-provider` respository that has the application in the
`test-data/nerd-dinner` path:" by changing "respository" to "repository" so it
reads "... `c-sharp-analyzer-provider` repository ..."; update the same sentence
in create-csharp-custom-rule.adoc where the `c-sharp-analyzer-provider` and
`test-data/nerd-dinner` strings appear.

In `@docs/topics/rules-development/yaml-dotnet-provider.adoc`:
- Line 12: Update the sentence for consistent naming/spacing and grammar: change
"supports referenced capability" to "supports the referenced capability", format
the field names with consistent spacing and commas as "`pattern`, `location`,
and `file_paths`" (use the plural `file_paths` to match schema), and ensure the
provider reference remains "the `csharp` provider" to keep style consistent.

---

Nitpick comments:
In `@docs/topics/rules-development/yaml-dotnet-provider.adoc`:
- Line 7: Update the AsciiDoc top-level title string currently written as "=
Csharp provider" to use the conventional language name by changing it to "= C#
provider"; locate the heading line in the document (the line that begins with "=
Csharp provider") and replace "Csharp" with "C#" so the title reads "C#
provider".

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d376be0 and 5a1a8a4.

📒 Files selected for processing (3)
  • assemblies/rules-development-guide/assembly_creating-rule.adoc
  • docs/topics/rules-development/create-csharp-custom-rule.adoc
  • docs/topics/rules-development/yaml-dotnet-provider.adoc

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
docs/topics/rules-development/yaml-provider-conditions.adoc (1)

466-469: Use [source, yaml] instead of [subs="+quotes"] for the code example.

Every other code snippet in this file uses [source, yaml] or [source, terminal]. The [subs="+quotes"] attribute produces an unstyled literal block with no syntax highlighting and is not needed here since the content contains no inline formatting marks.

✏️ Proposed fix
-[subs="+quotes"]
+[source, yaml]
 ----
 location: METHOD
 ----
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/yaml-provider-conditions.adoc` around lines 466
- 469, Replace the AsciiDoc block attribute [subs="+quotes"] with the standard
syntax-highlighted block marker [source, yaml] for the example around the
"location: METHOD" literal; update the block opener that currently reads
[subs="+quotes"] to [source, yaml] so the snippet uses consistent YAML
highlighting like other examples in yaml-provider-conditions.adoc and removes
the unstyled literal behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/topics/rules-development/yaml-provider-conditions.adoc`:
- Around line 455-465: Update the ambiguous `location` documentation: change
"Specify either of the following" to "Specify one of the following", and rewrite
the following bullets so each `location` value (`METHOD`, `CLASS`, `ALL`) is
explicitly mapped to what it covers (e.g., `CLASS` → classes, interfaces,
structs; `METHOD` → method definitions and calls; `ALL` → fields, namespaces,
imports, and any of the above), ensuring the four original bullets (type
references, method calls/definitions, field usages/declarations, namespace
imports/usages) are clearly assigned to one of the three values and remove any
conflicting wording.
- Line 447: The table cell for the provider currently uses a three-row span
token `.3+|xref:yaml-dotnet-provider_rules-prov-cond[csharp]` but only two rows
(`pattern` and `location` under `referenced`) exist; change the span token from
`.3+` to `.2+` for the `xref:yaml-dotnet-provider_rules-prov-cond[csharp]` cell
so the provider cell spans exactly the two intended rows (or add the missing
third row like `dependency` if a third capability is required).
- Line 447: Replace the broken xref target yaml-dotnet-provider_rules-prov-cond
in docs/topics/rules-development/yaml-provider-conditions.adoc with the correct
anchor yaml-dotnet-provider_{context}; update the xref call
xref:yaml-dotnet-provider_rules-prov-cond[csharp] to use
xref:yaml-dotnet-provider_{context}[csharp] (and similarly fix the three other
provider xrefs that use *_rules-prov-cond) so they point to the existing anchors
in yaml-dotnet-provider.adoc.

---

Nitpick comments:
In `@docs/topics/rules-development/yaml-provider-conditions.adoc`:
- Around line 466-469: Replace the AsciiDoc block attribute [subs="+quotes"]
with the standard syntax-highlighted block marker [source, yaml] for the example
around the "location: METHOD" literal; update the block opener that currently
reads [subs="+quotes"] to [source, yaml] so the snippet uses consistent YAML
highlighting like other examples in yaml-provider-conditions.adoc and removes
the unstyled literal behavior.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5a1a8a4 and 9dc191b.

📒 Files selected for processing (1)
  • docs/topics/rules-development/yaml-provider-conditions.adoc

@Pkylas007 Pkylas007 force-pushed the mta-6471-dotnet-provider branch from d3162a5 to 98acee3 Compare February 24, 2026 05:21
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
docs/topics/rules-development/yaml-provider-conditions.adoc (1)

454-471: Map location values to what they cover.

The text says “Specify one of the following” but lists four bullets without mapping to the valid values (METHOD, CLASS, ALL). Please align the bullets with the actual values to remove ambiguity.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/yaml-provider-conditions.adoc` around lines 454
- 471, The "location" documentation lists categories but doesn't map them to the
actual enum values; update the bullets so each valid `location` value is
explicitly named and described (e.g., "CLASS — Type references including
classes, interfaces and struct types", "METHOD — Method calls and definitions",
"ALL — Run the query on the entire source code"); ensure the example `location:
METHOD` remains correct and either add explicit entries for FIELD/IMPORT if
those are supported (e.g., "FIELD — Field usages and declarations", "IMPORT —
Namespace imports and usages") or remove/merge those bullets into the supported
values and add a note explaining which categories are covered by each valid
value.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/topics/rules-development/yaml-dotnet-provider.adoc`:
- Around line 12-16: Correct the typo "defenition" to "definition" in the
paragraph describing the csharp provider and standardize field names/spacing for
the `referenced` capability: ensure fields are written consistently (e.g.,
`pattern`, `location`, `file_path` or adopt `filepaths` if that matches the
schema) and add spaces after commas so it's "pattern, location, file_path" (or
"pattern, location, filepaths"); keep the backtick usage for inline code terms
like `csharp` and `referenced` and update the sentence that reads "Based on the
C# rule defenition" to "Based on the C# rule definition" and similarly adjust
the later sentence to list the fields with consistent naming and spacing.

In `@docs/topics/rules-development/yaml-provider-conditions.adoc`:
- Around line 448-471: The table in yaml-provider-conditions.adoc currently
lists only the pattern and location fields but the csharp provider doc also
mentions a file_path/filepaths field; verify whether the C# provider (referenced
as csharp in the docs) supports a filepaths/file_path condition and then either
add a corresponding row named "file_path"/"filepaths" (describe expected values
and example, matching the style/format of the existing "pattern" and "location"
rows) to the table alongside "pattern" and "location", or if the provider does
not support it remove the `file_path`/`filepaths` mention from the csharp
provider doc to keep both docs consistent; update the example block and NOTE
line as needed to reflect the presence or absence of filepaths.

---

Duplicate comments:
In `@docs/topics/rules-development/yaml-provider-conditions.adoc`:
- Around line 454-471: The "location" documentation lists categories but doesn't
map them to the actual enum values; update the bullets so each valid `location`
value is explicitly named and described (e.g., "CLASS — Type references
including classes, interfaces and struct types", "METHOD — Method calls and
definitions", "ALL — Run the query on the entire source code"); ensure the
example `location: METHOD` remains correct and either add explicit entries for
FIELD/IMPORT if those are supported (e.g., "FIELD — Field usages and
declarations", "IMPORT — Namespace imports and usages") or remove/merge those
bullets into the supported values and add a note explaining which categories are
covered by each valid value.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dc191b and 98acee3.

📒 Files selected for processing (6)
  • assemblies/rules-development-guide/assembly_creating-rule.adoc
  • assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc
  • docs/topics/rules-development/create-csharp-custom-rule.adoc
  • docs/topics/rules-development/yaml-dotnet-provider.adoc
  • docs/topics/rules-development/yaml-provider-conditions.adoc
  • docs/topics/vscode/proc_vscode-analyzing-application.adoc
🚧 Files skipped from review as they are similar to previous changes (4)
  • assemblies/rules-development-guide/assembly_creating-rule.adoc
  • docs/topics/rules-development/create-csharp-custom-rule.adoc
  • docs/topics/vscode/proc_vscode-analyzing-application.adoc
  • assemblies/rules-development-guide/assembly_rule-yaml-conditions.adoc

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
docs/topics/rules-development/yaml-dotnet-provider.adoc (1)

12-16: ⚠️ Potential issue | 🟡 Minor

Fix typo and normalize field naming/spacing.

“defenition” should be “definition,” and the field list should use consistent naming and spacing (e.g., pattern, location, filepaths or file_path—pick one and use it consistently).

✏️ Suggested edit
-Based on the `C#` rule defenition, the analyzer identifies violations in your code that you must resolve before the application migration. 
+Based on the `C#` rule definition, the analyzer identifies violations in your code that you must resolve before the application migration. 
@@
-The `csharp` provider supports `referenced` capability in rules to define fields such as `pattern`,`location` and `file_path` based on which the provider searches the code for violations. 
+The `csharp` provider supports `referenced` capability in rules to define fields such as `pattern`, `location`, and `file_path` based on which the provider searches the code for violations. 
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/yaml-dotnet-provider.adoc` around lines 12 -
16, Fix the typo "defenition" to "definition" in the paragraph describing the
csharp provider and normalize the referenced-fields list so naming and spacing
are consistent (choose either file_path or filepaths and apply it everywhere);
update the paragraph that mentions `C#` rule definition and the `referenced`
capability to list fields consistently as `pattern`, `location`, and `file_path`
(or your chosen variant) and ensure spacing/formatting matches the surrounding
docs.
docs/topics/rules-development/yaml-provider-conditions.adoc (1)

456-485: ⚠️ Potential issue | 🟡 Minor

Clarify location by mapping each value to its scope.

The text still lists four bullet items plus ALL without explicitly mapping them to METHOD, CLASS, and ALL, which leaves the semantics ambiguous.

✏️ Suggested rewording
-a|Specify one of the following for which the search query must be run. 
-
- * Type reference including classes, interfaces and structure types (struct)
+ a|Specify one of the following location values:
+
+ * `CLASS` — type references including classes, interfaces, and structs
@@
- * Method calls and definitions
+ * `METHOD` — method calls and definitions
@@
- * Field usages and declaration
-
- * Namespace imports and usages
-
- * `ALL` - You can also specify `ALL` as `location` to run a search query on the entire source code.
+ * `ALL` — all of the above, including field usages and namespace imports
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/topics/rules-development/yaml-provider-conditions.adoc` around lines 456
- 485, Clarify the meaning of the location parameter by explicitly mapping each
allowed value to its search scope: state that CLASS applies to type references
(classes, interfaces, struct), METHOD applies to method calls and definitions,
FIELD applies to field usages and declarations, NAMESPACE (or IMPORT) applies to
namespace imports and usages, and ALL runs across the entire source; update the
prose around the examples for csharp.referenced (the examples using location:
CLASS and location: METHOD and pattern) to reference these mappings so readers
can unambiguously match the keyword (METHOD, CLASS, FIELD, NAMESPACE, ALL) to
the scope searched.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@docs/topics/rules-development/yaml-dotnet-provider.adoc`:
- Around line 12-16: Fix the typo "defenition" to "definition" in the paragraph
describing the csharp provider and normalize the referenced-fields list so
naming and spacing are consistent (choose either file_path or filepaths and
apply it everywhere); update the paragraph that mentions `C#` rule definition
and the `referenced` capability to list fields consistently as `pattern`,
`location`, and `file_path` (or your chosen variant) and ensure
spacing/formatting matches the surrounding docs.

In `@docs/topics/rules-development/yaml-provider-conditions.adoc`:
- Around line 456-485: Clarify the meaning of the location parameter by
explicitly mapping each allowed value to its search scope: state that CLASS
applies to type references (classes, interfaces, struct), METHOD applies to
method calls and definitions, FIELD applies to field usages and declarations,
NAMESPACE (or IMPORT) applies to namespace imports and usages, and ALL runs
across the entire source; update the prose around the examples for
csharp.referenced (the examples using location: CLASS and location: METHOD and
pattern) to reference these mappings so readers can unambiguously match the
keyword (METHOD, CLASS, FIELD, NAMESPACE, ALL) to the scope searched.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98acee3 and b6a851c.

📒 Files selected for processing (2)
  • docs/topics/rules-development/yaml-dotnet-provider.adoc
  • docs/topics/rules-development/yaml-provider-conditions.adoc

@Pkylas007 Pkylas007 force-pushed the mta-6471-dotnet-provider branch from a1b71b0 to 71510f7 Compare February 24, 2026 09:10
@Pkylas007 Pkylas007 requested a review from dymurray February 26, 2026 13:58
@Pkylas007 Pkylas007 force-pushed the mta-6471-dotnet-provider branch 2 times, most recently from 4a4b070 to a1ed8f6 Compare February 27, 2026 08:03

.Prerequisites

* You installed `.NET` SDK 9.x or higher

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to install these locally; they are in the container image.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this from prerequisites.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need to install these locally; they are in the container image.

This is true for all the Prerequisites

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mguetta1 Sorry, do you want me to remove all prerequisites from here?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is in the dockerfile used to build the container image: https://github.com/konveyor/c-sharp-analyzer-provider/blob/main/Dockerfile#L16-L20

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shawn-hurley could you please confirm whether the prerequisites are needed here?

Copy link

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we should change the requirements, and update the examples

@Pkylas007 Pkylas007 requested review from mguetta1 and shawn-hurley and removed request for dymurray March 2, 2026 17:12
@Pkylas007
Copy link
Collaborator Author

@shawn-hurley @mguetta1 Thank you very much for your feedback!
I have updated the documentation to include your points. Could you take a look at the updates, please?

Copy link

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally the changes look good to me, depending on how we have examples for extending the hub via extensions and what not, may determine where/if we want to explain how the c# provider works (based on our conversation offline).

@Pkylas007
Copy link
Collaborator Author

Pkylas007 commented Mar 4, 2026

Generally the changes look good to me, depending on how we have examples for extending the hub via extensions and what not, may determine where/if we want to explain how the c# provider works (based on our conversation offline).

Thank you @shawn-hurley ! If you mean how users can extend the hub by creating custom providers etc., that is not documented downstream. I'll discuss the need for this requirement with you offline.

@Pkylas007 Pkylas007 force-pushed the mta-6471-dotnet-provider branch from fd66194 to 1dd58fa Compare March 4, 2026 08:50
Copy link

@shawn-hurley shawn-hurley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@Pkylas007 Pkylas007 requested a review from mguetta1 March 9, 2026 08:46
Copy link
Collaborator

@mguetta1 mguetta1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@mpershina mpershina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes needed, otherwise, LGTM

Signed-off-by: Prabha Kylasamiyer Sundara Rajan <pkylasam@pkylasam-thinkpadp16vgen1.bengluru.csb>
@Pkylas007 Pkylas007 force-pushed the mta-6471-dotnet-provider branch from 32e00cf to f55bc9d Compare March 12, 2026 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants